/**
 * 模态框插件样式
 */

.modal-overlay {
  align-items: center;
  animation: fadeIn var(--schedule-transition-base);
  background: rgb(0, 0, 0, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: var(--schedule-z-index-modal);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  animation: slideUp var(--schedule-transition-base);
  background: var(--schedule-bg-primary);
  border-radius: var(--schedule-border-radius);
  box-shadow: var(--schedule-shadow-lg);
  max-height: 90vh;
  max-width: 500px;
  overflow: auto;
  width: 90%;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  align-items: center;
  border-bottom: 1px solid var(--schedule-border-color);
  display: flex;
  justify-content: space-between;
  padding: var(--schedule-spacing-lg);
}

.modal-header h3 {
  color: var(--schedule-text-primary);
  font-size: var(--schedule-font-size-xl);
  margin: 0;
}

.modal-close {
  align-items: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--schedule-text-secondary);
  cursor: pointer;
  display: flex;
  font-size: 28px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all var(--schedule-transition-fast);
  width: 32px;
}

.modal-close:hover {
  background: var(--schedule-bg-secondary);
  color: var(--schedule-text-primary);
}

.modal-body {
  padding: var(--schedule-spacing-lg);
}

.form-group {
  margin-bottom: var(--schedule-spacing-md);
}

.form-group label {
  color: var(--schedule-text-primary);
  display: block;
  font-weight: 500;
  margin-bottom: var(--schedule-spacing-xs);
}

.form-control {
  border: 1px solid var(--schedule-border-color);
  border-radius: var(--schedule-border-radius);
  font-family: inherit;
  font-size: var(--schedule-font-size-md);
  outline: none;
  padding: 8px 12px;
  transition: border-color var(--schedule-transition-fast);
  width: 100%;
}

.form-control:focus {
  border-color: var(--schedule-primary-color);
}

.form-control:disabled {
  background: var(--schedule-bg-secondary);
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.modal-footer {
  align-items: center;
  border-top: 1px solid var(--schedule-border-color);
  display: flex;
  justify-content: space-between;
  padding: var(--schedule-spacing-lg);
}

.modal-actions {
  display: flex;
  gap: var(--schedule-spacing-sm);
}

.btn-secondary {
  background: var(--schedule-gray-400);
  color: var(--schedule-text-inverse);
}

.btn-secondary:hover {
  background: var(--schedule-gray-500);
}

.btn-success {
  background: var(--schedule-secondary-color);
  color: var(--schedule-text-inverse);
}

.btn-success:hover {
  background: #27ae60;
}

.btn-danger {
  background: var(--schedule-danger-color);
  color: var(--schedule-text-inverse);
}

.btn-danger:hover {
  background: #c0392b;
}
